<%@page import="util.HttpUtil"%>
<%@page import="utils.*,dicts.*"%>
<%@page import="java.util.*"%>
<%
	String version=request.getParameter("version") ;
	
	String no=request.getParameter("no") ;
	String key=request.getParameter("key");
	String transaction=request.getParameter("transaction") ;
	String percent=request.getParameter("percent") ;
	String remark=request.getParameter("remark") ;
	
	String signature=DigestUtil.sha256(no+transaction+percent+key);
	
	String path=RealmDict.GATEWAY+"Refund";
	
	Map map=new HashMap();
	map.put("version",version);
	map.put("no",no);
	map.put("transaction",transaction);
	map.put("percent",percent);
	map.put("remark",remark);
	map.put("signature",signature);
	
	String res=new HttpUtil().post(path,map);

%>

<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>MOCK</title>
<link href="<%=request.getContextPath()%>/css/global.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/global.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/fingerprint2.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jstz.js"></script>

</head>
<body style="background-color: #1c3e57; margin: 10px;">
	<div style="padding: 25px; margin-bottom: 10px; border: 1px dotted #ccc; background-color: #fff;">
		<h1><a href="<%=request.getContextPath (  )%>">首页</a> | 提交退款至退款网关并返回支付结果</h1>
	</div>
	<div style="padding: 25px; border: 1px dotted #ccc; background-color: #fff;">

		<table border="0" width="100%">
			<tr>
				<td width="25%"></td>
				<td width="25%"></td>
				<td width="25%"></td>
				<td width="25%"></td>
			</tr>
			<tr>
				<td><hr /></td>
				<td><hr /></td>
				<td><hr /></td>
				<td><hr /></td>
			</tr>
			<tr>
				<td colspan="4">&nbsp;<%=res.replaceAll(",", ",</br>") %></td>
			</tr>
			<tr>
				<td><hr /></td>
				<td><hr /></td>
				<td><hr /></td>
				<td><hr /></td>
			</tr>
			<tr>
				<td colspan="4" align="right"><input type="button" class="submit" value="返回首页" onclick="location.href='<%=request.getContextPath()%>'">
			</tr>
		</table>
	</div>
</body>